package pacBioSimple;

import java.util.ArrayList;
import java.util.List;

public class EntropyTestMain {

	/**
	 * @param args
	 */
	public static void main(String[] args) 
	{
//		String example= "AAAAAAACAAAAAAAAAAAAAAAAAAAAAAA";
//		String example2= "TATTCCGGCTGCTTCAGGTGTCAAAATCTGC";
		String example= "AAAAAAAC";
		String example2= "AAAAAAAAAAAAAAAAAAACCGCTTCGTCGT";
		List<Character> alphabet = new ArrayList<Character>();
		String alp="ACGT";
		for(int i=0; i < alp.length();++i)
		{
			alphabet.add(alp.charAt(i));
		}
		Entropy<Character> test = new Entropy<Character>(alphabet);
		
		System.out.println("max entropy " +test.calcMaxEntropy());
		System.out.println("entropy of example "+ example+" "+ test.calcEntropy(example));
		System.out.println("entropy of example2 "+ example2+" "+ test.calcEntropy(example2));
		
		
		String alphabet2 ="AAAAAAAAAAAAAAAAAAACCGCTTCGTCGT";
		List<StringBuilder> alpha = new ArrayList<StringBuilder>();
		//int length = alphabet2.length();
		for(int i=0; i <=alphabet2.length()-2;i+=2)
		{
			String temp=  alphabet2.substring(i, i+2);
			System.out.println(temp);
			alpha.add(new StringBuilder(temp));
		}
		Entropy<StringBuilder> test2 = new Entropy<StringBuilder>(alpha);
		System.out.println("max entropy " +test2.calcMaxEntropy());
		System.out.println("entropy of example "+ example+" "+ test2.calcEntropyDimer(example));
		System.out.println("entropy of example2 "+ example2+" "+ test2.calcEntropyDimer(example2));
	}

}
